package edu.xmist.demo15.controller;

import edu.xmist.demo15.core.MemoryGlobalStatistics;
import edu.xmist.demo15.core.StatisticsFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/test")
public class TestController {

    @RequestMapping("/hai")
    public String hai() {
        int count = StatisticsFactory.getInstance().incr();
        return "hai " + count;
    }


    @RequestMapping("/hai2")
    public String hai2() {
        int count = StatisticsFactory.getInstance().incr();
        return "hai2 " + count;
    }

    @RequestMapping("/hai3")
    public String hai3() {
        int count = StatisticsFactory.getInstance().incr();
        return "hai3 " + count;
    }
}
